//
// Created by DELL on 2021/3/18.
//
#include "sylar.h"
sylar::Logger::ptr g_logger= SYLAR_LOG_ROOT();
void test(){
    sylar::http::HttpRequest::ptr req(new sylar::http::HttpRequest);
    req->setHeader("host","www.baidu.com");
    req->setBody("hello sylar");

    SYLAR_LOG_INFO(g_logger) << "\n"<<req->toString();

    sylar::http::HttpResponse::ptr rsp(new sylar::http::HttpResponse);
    rsp->setHeader("X-X","sylar");
    rsp->setBody("hello sylar");
    rsp->setStatus((sylar::http::HttpStatus)400);
    SYLAR_LOG_INFO(g_logger) << "\n"<<rsp->toString();

}

int main(int argc,char**argv){
    test();
    return 0;
}
